/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package smartgrid;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class FaceBookAccountDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression ID;
	public final StringExpression UId;
	public final StringExpression Nome;
	public final StringExpression EMail;
	public final BooleanExpression Enable;
	
	public FaceBookAccountDetachedCriteria() {
		super(smartgrid.FaceBookAccount.class, smartgrid.FaceBookAccountCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		UId = new StringExpression("UId", this.getDetachedCriteria());
		Nome = new StringExpression("Nome", this.getDetachedCriteria());
		EMail = new StringExpression("EMail", this.getDetachedCriteria());
		Enable = new BooleanExpression("Enable", this.getDetachedCriteria());
	}
	
	public FaceBookAccountDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, smartgrid.FaceBookAccountCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		UId = new StringExpression("UId", this.getDetachedCriteria());
		Nome = new StringExpression("Nome", this.getDetachedCriteria());
		EMail = new StringExpression("EMail", this.getDetachedCriteria());
		Enable = new BooleanExpression("Enable", this.getDetachedCriteria());
	}
	
	public ContractDetachedCriteria createContract_roleCriteria() {
		return new ContractDetachedCriteria(createCriteria("ORM_Contract_role"));
	}
	
	public AnnotationDetachedCriteria createAnnotationsCriteria() {
		return new AnnotationDetachedCriteria(createCriteria("ORM_Annotations"));
	}
	
	public FaceBookAccount uniqueFaceBookAccount(PersistentSession session) {
		return (FaceBookAccount) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public FaceBookAccount[] listFaceBookAccount(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (FaceBookAccount[]) list.toArray(new FaceBookAccount[list.size()]);
	}
}

